package cz.data.domain.metadata.rpc;

import cz.data.common.annotation.DataInner;
import cz.data.domain.metadata.model.entity.MetadataTableEntity;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

@FeignClient(contextId = "metadataTableFeign", value = "metadata-domain-api")
public interface MetadataTableFeign {

    @DataInner
    @GetMapping("/inner/tables/{id}")
    MetadataTableEntity getMetadataTableById(@PathVariable("id") String id);

    @DataInner
    @GetMapping("/inner/tables/source/{id}")
    List<MetadataTableEntity> getInnerMetadataTableBySourceId(@PathVariable("id") String id);

    @GetMapping("/tables/source/{id}")
    List<MetadataTableEntity> getMetadataTableBySourceId(@PathVariable("id") String id);

    @DataInner
    @GetMapping("/inner/tables/list")
    List<MetadataTableEntity> getMetadataTableList();
}
